#ifndef AST_VISITOR_H
#define AST_VISITOR_H
#pragma once

/**
  @brief The AstVisitor class 
  
  @date Auto generated on 2022/05/26 17:20:52
*/

#include <type_traits>
#include "macros.h"
#include "utils.h"
#include "cpp-gen/FormalParser.h"
#include "dummy_node.h"

#define RETURN_DEFAULT return defaultResult();
#define IF_NULLPTR_RETURN_DEFAULT(x) \
    if (!x)                          \
    RETURN_DEFAULT

namespace antlr4::tree
{
    class ParseTree;
    class TerminalNode;
    class ErrorNode;
}

using antlr4::RuleContext;
using antlr4::Token;
using antlr4::tree::ErrorNode;
using antlr4::tree::ParseTree;
using antlr4::tree::TerminalNode;

namespace cyclone::parser
{
    template <typename Q>
    bool is(ParseTree *ptr)
    {
        return nullptr != dynamic_cast<Q *>(ptr);
    };
    template <typename T>
    class AstVisitor
    {
        CHECK_TYPE_HAS_VISIBLE_PROPERTY_NAME(isArrayList);

        template <typename Q>
        T dispatchHelper(ParseTree *ptr)
        {
#ifdef CYCLONE_PARSER_DEBUG
            if (auto target = dynamic_cast<Q *>(ptr))
                return visit(target);
            else
            {
                std::cout << "error , cannot cast to " << typeid(Q *).name();
                return defaultResult();
            }
#endif // CYCLONE_PARSER_DEBUG
            return visit(reinterpret_cast<Q *>(ptr));
        }
        using RouteMap = std::unordered_map<short, std::pair<decltype(&AstVisitor<T>::dispatchHelper<ParseTree>), decltype(&is<ParseTree>)>>;
        static const RouteMap routing_;

    public:
        virtual ~AstVisitor() = default;
        virtual T visit(ParseTree *node) = 0;
        virtual T visit(TerminalNode *node) = 0;
        virtual T visit(DummyNode *node) = 0;
        virtual T visit(ErrorNode *node) = 0;
        virtual T visit(Token *node) = 0;
        virtual T defaultResult() = 0;

        template <typename Q>
        typename std::enable_if_t<(!std::is_base_of_v<ParserRuleContext, Q>), T>
        visitAnonymousNode(Q *tree)
        {
            IF_NULLPTR_RETURN_DEFAULT(tree);
            return visit(tree);
        }

        template <typename Q>
        typename std::enable_if_t<std::is_base_of_v<ParserRuleContext, Q>, T>
        visitAnonymousNode(Q *tree)
        {
            IF_NULLPTR_RETURN_DEFAULT(tree)
            if (tree->getContextId() == DummyNode::dummyNodeContentId())
                return visit(reinterpret_cast<DummyNode *>(tree));
            std::vector<T> _resultList;
            for (auto child : tree->children)
            {
                const auto id = child->getContextId();
                if (id == DummyNode::dummyNodeContentId())
                     _resultList.push_back(visit(reinterpret_cast<DummyNode *>(child)));
                if (Utils::shouldIgnore(child, id))
                    continue;
                switch (id)
                {
                case INVALID_INDEX:
                    break;
                case ERROR_NODE_INDEX:
                    _resultList.push_back(visit(reinterpret_cast<ErrorNode *>(child)));
                    break;
                case TERMINAL_NODE_INDEX:
                    _resultList.push_back(visit(reinterpret_cast<TerminalNode *>(child)));
                    break;
                default:
                    if (routing_.end() != routing_.find(id))
                        _resultList.push_back(std::bind(routing_.at(id).first, this, child)());
                }
            }
            if constexpr (CheckisArrayList<Q>::value)
                return _resultList;
            return 1 == _resultList.size() ? _resultList.at(0) : _resultList;
        }

        template <typename Q>
        typename std::enable_if_t<!std::is_base_of_v<ParserRuleContext, Q>, T>
        dispatch(Q *tree)
        {
            IF_NULLPTR_RETURN_DEFAULT(tree)
            return visit(tree);
        }

        template <typename Q>
        typename std::enable_if_t<std::is_base_of_v<ParserRuleContext, Q>, T>
        dispatch(Q *tree)
        {
            if (!tree)
            {
                if constexpr (CheckisArrayList<Q>::value)
                    return T::array();
                return defaultResult();
            }
            const auto ruleIndex = tree->getContextId();
            return ruleIndex == DummyNode::dummyNodeContentId() ? visit(reinterpret_cast<DummyNode *>(tree)) : (routing_.end() == routing_.find(ruleIndex) ? defaultResult() : std::bind(routing_.at(ruleIndex).first, this, tree)());
        }

        virtual  T visit ( FormalParser::BaseClassContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ParameterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ParameterListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TSTypeAliasDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectPatternContext * ctx ) = 0;
        virtual  T visit ( FormalParser::RestElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IdentifierPatternContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ForInStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrayPatternContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AssignmentPatternContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InitializerContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AdvancedParameterListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrayElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TryStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyGetterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::WhileStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ParenthesizedExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EmptyStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::RequiredParameterListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::StatementListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AdvancedParameterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::OptionalParameterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::RequiredParameterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AccessibilityModifierContext * ctx ) = 0;
        virtual  T visit ( FormalParser::UpdateExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ImportAliasDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InterfaceExtendsClauseContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ContinueStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ClassOrInterfaceTypeListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectPatternElementArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ClassExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ThrowStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EnumDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EnumBodyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EnumMemberListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FromBlockContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ForOfStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GetterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SwitchStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EnumMemberContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TSEnumDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitXorExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BlockStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ProgramContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BaseFunctionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SourceElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ImportStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DeclarationStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExportStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::CaseClauseContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TSModuleDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FunctionDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitAndExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IfStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DoWhileStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ForStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BreakStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ReturnStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::VariableDeclaratorListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::WithStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::LabeledStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectOrArrayGenericTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DebuggerStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExpressionStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BraceBlockContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DefaultClauseContext * ctx ) = 0;
        virtual  T visit ( FormalParser::VariableDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitOrExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MultipleImportStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BaseForXStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::VardeclContext * ctx ) = 0;
        virtual  T visit ( FormalParser::VariableDeclaratorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ForInitStatementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::VarModifierContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SwitchCaseListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::CaseClausesContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AdditiveOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::CatchProductionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FinallyProductionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ClassBodyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyExpressionAssignmentContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ClassExtendsClauseContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyDefinitionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ImplementsClauseContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ClassElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MethodDefinitionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorMethodContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorFunctionDeclarationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorBlockContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorDefinitionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IteratorBlockContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IteratorDefinitionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FunctionBodyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MethodPropertyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SourceArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SpreadElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitShiftExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::LogicalExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrayElementArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrayPatternElementArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectElementArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyNameContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FunctionReturnTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyKeyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ComputedPropertyExpressionAssignmentContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertySetterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PropertyShorthandContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ShorthandAssignmentPropertyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AssignmentPatternInObjectContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectPatternElementContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GetAccessorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitShiftOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SetAccessorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArgumentArrayListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArgumentContext * ctx ) = 0;
        virtual  T visit ( FormalParser::RelationalExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExpressionSequenceContext * ctx ) = 0;
        virtual  T visit ( FormalParser::UpdateOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::UnaryOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExponentiationOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MultiplicativeOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::RelationalOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InstanceofOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EqualityOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitAndOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitOrOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BitXorOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::FunctionExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ObjectPropertyPairContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrowFunctionExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MemberExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::NewExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::CallExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::UnaryExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExponentiationExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MultiplicativeExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AdditiveExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InstanceofExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EqualityExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ConditionalExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::QuestionMarkFollowedByDecimalDirectlyConditionExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PatternInvolvedAssignmentExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AssignmentExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TemplateLiteralExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TaggedTemplateExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IteratorsExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorsExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GeneratorsFunctionExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::YieldExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AwaitExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ImportExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MetaPropertyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ParenthesizedPrimTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ThisExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IdentifierExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SuperExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::LiteralExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrayExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::OutputContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TSAsExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::IdentifierContext * ctx ) = 0;
        virtual  T visit ( FormalParser::MetaPropertyIdentifierContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PrivateIdentifierContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BracketMemberExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::DotMemberExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PrivateMemberExpressionContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GenericKindContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrowFunctionParametersContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ArrowFunctionBodyContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AssignmentOperatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::NumericLiteralContext * ctx ) = 0;
        virtual  T visit ( FormalParser::LiteralContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TemplateLiteralContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AtomTemplateStringContext * ctx ) = 0;
        virtual  T visit ( FormalParser::BraceTemplateStringContext * ctx ) = 0;
        virtual  T visit ( FormalParser::KeywordContext * ctx ) = 0;
        virtual  T visit ( FormalParser::SetterContext * ctx ) = 0;
        virtual  T visit ( FormalParser::EosContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AssignableContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypeAnnotationContext * ctx ) = 0;
        virtual  T visit ( FormalParser::QualifiedNameContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypeNameContext * ctx ) = 0;
        virtual  T visit ( FormalParser::JsPrimitiveTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::ExtendedPrimitiveTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypeListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AnonymousObjectPropertyListSeparatorContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AnonymousObjectPropertyListContext * ctx ) = 0;
        virtual  T visit ( FormalParser::CommaGenericContext * ctx ) = 0;
        virtual  T visit ( FormalParser::AngleGenericContext * ctx ) = 0;
        virtual  T visit ( FormalParser::PrimitiveTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::GenericTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TupleTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::UnionTypeContext * ctx ) = 0;
        virtual  T visit ( FormalParser::StructContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypeReferenceContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypeAnnotContext * ctx ) = 0;
        virtual  T visit ( FormalParser::InputContext * ctx ) = 0;
        virtual  T visit ( FormalParser::TypePredicateContext * ctx ) = 0;
    };

template <class T>
const typename AstVisitor<T>::RouteMap AstVisitor<T>::routing_ = {
        std::make_pair(FormalParser::ContextIdBaseClass,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BaseClassContext> , &is<FormalParser::BaseClassContext>)),
        std::make_pair(FormalParser::ContextIdParameter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ParameterContext> , &is<FormalParser::ParameterContext>)),
        std::make_pair(FormalParser::ContextIdParameterList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ParameterListContext> , &is<FormalParser::ParameterListContext>)),
        std::make_pair(FormalParser::ContextIdTSTypeAliasDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TSTypeAliasDeclarationContext> , &is<FormalParser::TSTypeAliasDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdObjectPattern,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectPatternContext> , &is<FormalParser::ObjectPatternContext>)),
        std::make_pair(FormalParser::ContextIdRestElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::RestElementContext> , &is<FormalParser::RestElementContext>)),
        std::make_pair(FormalParser::ContextIdIdentifierPattern,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IdentifierPatternContext> , &is<FormalParser::IdentifierPatternContext>)),
        std::make_pair(FormalParser::ContextIdForInStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ForInStatementContext> , &is<FormalParser::ForInStatementContext>)),
        std::make_pair(FormalParser::ContextIdArrayPattern,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrayPatternContext> , &is<FormalParser::ArrayPatternContext>)),
        std::make_pair(FormalParser::ContextIdAssignmentPattern,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AssignmentPatternContext> , &is<FormalParser::AssignmentPatternContext>)),
        std::make_pair(FormalParser::ContextIdInitializer,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InitializerContext> , &is<FormalParser::InitializerContext>)),
        std::make_pair(FormalParser::ContextIdAdvancedParameterList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AdvancedParameterListContext> , &is<FormalParser::AdvancedParameterListContext>)),
        std::make_pair(FormalParser::ContextIdArrayElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrayElementContext> , &is<FormalParser::ArrayElementContext>)),
        std::make_pair(FormalParser::ContextIdTryStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TryStatementContext> , &is<FormalParser::TryStatementContext>)),
        std::make_pair(FormalParser::ContextIdPropertyGetter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyGetterContext> , &is<FormalParser::PropertyGetterContext>)),
        std::make_pair(FormalParser::ContextIdWhileStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::WhileStatementContext> , &is<FormalParser::WhileStatementContext>)),
        std::make_pair(FormalParser::ContextIdParenthesizedExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ParenthesizedExpressionContext> , &is<FormalParser::ParenthesizedExpressionContext>)),
        std::make_pair(FormalParser::ContextIdEmptyStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EmptyStatementContext> , &is<FormalParser::EmptyStatementContext>)),
        std::make_pair(FormalParser::ContextIdRequiredParameterList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::RequiredParameterListContext> , &is<FormalParser::RequiredParameterListContext>)),
        std::make_pair(FormalParser::ContextIdStatementList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::StatementListContext> , &is<FormalParser::StatementListContext>)),
        std::make_pair(FormalParser::ContextIdAdvancedParameter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AdvancedParameterContext> , &is<FormalParser::AdvancedParameterContext>)),
        std::make_pair(FormalParser::ContextIdOptionalParameter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::OptionalParameterContext> , &is<FormalParser::OptionalParameterContext>)),
        std::make_pair(FormalParser::ContextIdRequiredParameter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::RequiredParameterContext> , &is<FormalParser::RequiredParameterContext>)),
        std::make_pair(FormalParser::ContextIdAccessibilityModifier,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AccessibilityModifierContext> , &is<FormalParser::AccessibilityModifierContext>)),
        std::make_pair(FormalParser::ContextIdUpdateExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::UpdateExpressionContext> , &is<FormalParser::UpdateExpressionContext>)),
        std::make_pair(FormalParser::ContextIdImportAliasDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ImportAliasDeclarationContext> , &is<FormalParser::ImportAliasDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdInterfaceExtendsClause,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InterfaceExtendsClauseContext> , &is<FormalParser::InterfaceExtendsClauseContext>)),
        std::make_pair(FormalParser::ContextIdContinueStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ContinueStatementContext> , &is<FormalParser::ContinueStatementContext>)),
        std::make_pair(FormalParser::ContextIdClassOrInterfaceTypeList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ClassOrInterfaceTypeListContext> , &is<FormalParser::ClassOrInterfaceTypeListContext>)),
        std::make_pair(FormalParser::ContextIdObjectPatternElementArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectPatternElementArrayListContext> , &is<FormalParser::ObjectPatternElementArrayListContext>)),
        std::make_pair(FormalParser::ContextIdClassExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ClassExpressionContext> , &is<FormalParser::ClassExpressionContext>)),
        std::make_pair(FormalParser::ContextIdThrowStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ThrowStatementContext> , &is<FormalParser::ThrowStatementContext>)),
        std::make_pair(FormalParser::ContextIdEnumDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EnumDeclarationContext> , &is<FormalParser::EnumDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdEnumBody,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EnumBodyContext> , &is<FormalParser::EnumBodyContext>)),
        std::make_pair(FormalParser::ContextIdEnumMemberList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EnumMemberListContext> , &is<FormalParser::EnumMemberListContext>)),
        std::make_pair(FormalParser::ContextIdFromBlock,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FromBlockContext> , &is<FormalParser::FromBlockContext>)),
        std::make_pair(FormalParser::ContextIdForOfStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ForOfStatementContext> , &is<FormalParser::ForOfStatementContext>)),
        std::make_pair(FormalParser::ContextIdGetter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GetterContext> , &is<FormalParser::GetterContext>)),
        std::make_pair(FormalParser::ContextIdSwitchStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SwitchStatementContext> , &is<FormalParser::SwitchStatementContext>)),
        std::make_pair(FormalParser::ContextIdEnumMember,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EnumMemberContext> , &is<FormalParser::EnumMemberContext>)),
        std::make_pair(FormalParser::ContextIdTSEnumDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TSEnumDeclarationContext> , &is<FormalParser::TSEnumDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdBitXorExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitXorExpressionContext> , &is<FormalParser::BitXorExpressionContext>)),
        std::make_pair(FormalParser::ContextIdBlockStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BlockStatementContext> , &is<FormalParser::BlockStatementContext>)),
        std::make_pair(FormalParser::ContextIdProgram,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ProgramContext> , &is<FormalParser::ProgramContext>)),
        std::make_pair(FormalParser::ContextIdBaseFunction,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BaseFunctionContext> , &is<FormalParser::BaseFunctionContext>)),
        std::make_pair(FormalParser::ContextIdSourceElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SourceElementContext> , &is<FormalParser::SourceElementContext>)),
        std::make_pair(FormalParser::ContextIdImportStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ImportStatementContext> , &is<FormalParser::ImportStatementContext>)),
        std::make_pair(FormalParser::ContextIdDeclarationStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DeclarationStatementContext> , &is<FormalParser::DeclarationStatementContext>)),
        std::make_pair(FormalParser::ContextIdExportStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExportStatementContext> , &is<FormalParser::ExportStatementContext>)),
        std::make_pair(FormalParser::ContextIdObjectExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectExpressionContext> , &is<FormalParser::ObjectExpressionContext>)),
        std::make_pair(FormalParser::ContextIdCaseClause,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::CaseClauseContext> , &is<FormalParser::CaseClauseContext>)),
        std::make_pair(FormalParser::ContextIdTSModuleDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TSModuleDeclarationContext> , &is<FormalParser::TSModuleDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdFunctionDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FunctionDeclarationContext> , &is<FormalParser::FunctionDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdBitAndExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitAndExpressionContext> , &is<FormalParser::BitAndExpressionContext>)),
        std::make_pair(FormalParser::ContextIdIfStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IfStatementContext> , &is<FormalParser::IfStatementContext>)),
        std::make_pair(FormalParser::ContextIdDoWhileStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DoWhileStatementContext> , &is<FormalParser::DoWhileStatementContext>)),
        std::make_pair(FormalParser::ContextIdForStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ForStatementContext> , &is<FormalParser::ForStatementContext>)),
        std::make_pair(FormalParser::ContextIdBreakStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BreakStatementContext> , &is<FormalParser::BreakStatementContext>)),
        std::make_pair(FormalParser::ContextIdReturnStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ReturnStatementContext> , &is<FormalParser::ReturnStatementContext>)),
        std::make_pair(FormalParser::ContextIdVariableDeclaratorList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::VariableDeclaratorListContext> , &is<FormalParser::VariableDeclaratorListContext>)),
        std::make_pair(FormalParser::ContextIdWithStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::WithStatementContext> , &is<FormalParser::WithStatementContext>)),
        std::make_pair(FormalParser::ContextIdLabeledStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::LabeledStatementContext> , &is<FormalParser::LabeledStatementContext>)),
        std::make_pair(FormalParser::ContextIdObjectOrArrayGenericType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectOrArrayGenericTypeContext> , &is<FormalParser::ObjectOrArrayGenericTypeContext>)),
        std::make_pair(FormalParser::ContextIdDebuggerStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DebuggerStatementContext> , &is<FormalParser::DebuggerStatementContext>)),
        std::make_pair(FormalParser::ContextIdExpressionStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExpressionStatementContext> , &is<FormalParser::ExpressionStatementContext>)),
        std::make_pair(FormalParser::ContextIdBraceBlock,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BraceBlockContext> , &is<FormalParser::BraceBlockContext>)),
        std::make_pair(FormalParser::ContextIdDefaultClause,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DefaultClauseContext> , &is<FormalParser::DefaultClauseContext>)),
        std::make_pair(FormalParser::ContextIdVariableDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::VariableDeclarationContext> , &is<FormalParser::VariableDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DeclarationContext> , &is<FormalParser::DeclarationContext>)),
        std::make_pair(FormalParser::ContextIdBitOrExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitOrExpressionContext> , &is<FormalParser::BitOrExpressionContext>)),
        std::make_pair(FormalParser::ContextIdMultipleImportStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MultipleImportStatementContext> , &is<FormalParser::MultipleImportStatementContext>)),
        std::make_pair(FormalParser::ContextIdBaseForXStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BaseForXStatementContext> , &is<FormalParser::BaseForXStatementContext>)),
        std::make_pair(FormalParser::ContextIdVardecl,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::VardeclContext> , &is<FormalParser::VardeclContext>)),
        std::make_pair(FormalParser::ContextIdVariableDeclarator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::VariableDeclaratorContext> , &is<FormalParser::VariableDeclaratorContext>)),
        std::make_pair(FormalParser::ContextIdForInitStatement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ForInitStatementContext> , &is<FormalParser::ForInitStatementContext>)),
        std::make_pair(FormalParser::ContextIdVarModifier,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::VarModifierContext> , &is<FormalParser::VarModifierContext>)),
        std::make_pair(FormalParser::ContextIdSwitchCaseList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SwitchCaseListContext> , &is<FormalParser::SwitchCaseListContext>)),
        std::make_pair(FormalParser::ContextIdCaseClauses,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::CaseClausesContext> , &is<FormalParser::CaseClausesContext>)),
        std::make_pair(FormalParser::ContextIdAdditiveOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AdditiveOperatorContext> , &is<FormalParser::AdditiveOperatorContext>)),
        std::make_pair(FormalParser::ContextIdCatchProduction,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::CatchProductionContext> , &is<FormalParser::CatchProductionContext>)),
        std::make_pair(FormalParser::ContextIdFinallyProduction,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FinallyProductionContext> , &is<FormalParser::FinallyProductionContext>)),
        std::make_pair(FormalParser::ContextIdClassBody,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ClassBodyContext> , &is<FormalParser::ClassBodyContext>)),
        std::make_pair(FormalParser::ContextIdPropertyExpressionAssignment,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyExpressionAssignmentContext> , &is<FormalParser::PropertyExpressionAssignmentContext>)),
        std::make_pair(FormalParser::ContextIdClassExtendsClause,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ClassExtendsClauseContext> , &is<FormalParser::ClassExtendsClauseContext>)),
        std::make_pair(FormalParser::ContextIdPropertyDefinition,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyDefinitionContext> , &is<FormalParser::PropertyDefinitionContext>)),
        std::make_pair(FormalParser::ContextIdImplementsClause,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ImplementsClauseContext> , &is<FormalParser::ImplementsClauseContext>)),
        std::make_pair(FormalParser::ContextIdClassElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ClassElementContext> , &is<FormalParser::ClassElementContext>)),
        std::make_pair(FormalParser::ContextIdMethodDefinition,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MethodDefinitionContext> , &is<FormalParser::MethodDefinitionContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorMethod,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorMethodContext> , &is<FormalParser::GeneratorMethodContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorFunctionDeclaration,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorFunctionDeclarationContext> , &is<FormalParser::GeneratorFunctionDeclarationContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorBlock,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorBlockContext> , &is<FormalParser::GeneratorBlockContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorDefinition,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorDefinitionContext> , &is<FormalParser::GeneratorDefinitionContext>)),
        std::make_pair(FormalParser::ContextIdIteratorBlock,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IteratorBlockContext> , &is<FormalParser::IteratorBlockContext>)),
        std::make_pair(FormalParser::ContextIdIteratorDefinition,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IteratorDefinitionContext> , &is<FormalParser::IteratorDefinitionContext>)),
        std::make_pair(FormalParser::ContextIdFunctionBody,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FunctionBodyContext> , &is<FormalParser::FunctionBodyContext>)),
        std::make_pair(FormalParser::ContextIdMethodProperty,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MethodPropertyContext> , &is<FormalParser::MethodPropertyContext>)),
        std::make_pair(FormalParser::ContextIdSourceArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SourceArrayListContext> , &is<FormalParser::SourceArrayListContext>)),
        std::make_pair(FormalParser::ContextIdSpreadElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SpreadElementContext> , &is<FormalParser::SpreadElementContext>)),
        std::make_pair(FormalParser::ContextIdBitShiftExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitShiftExpressionContext> , &is<FormalParser::BitShiftExpressionContext>)),
        std::make_pair(FormalParser::ContextIdLogicalExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::LogicalExpressionContext> , &is<FormalParser::LogicalExpressionContext>)),
        std::make_pair(FormalParser::ContextIdArrayElementArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrayElementArrayListContext> , &is<FormalParser::ArrayElementArrayListContext>)),
        std::make_pair(FormalParser::ContextIdArrayPatternElementArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrayPatternElementArrayListContext> , &is<FormalParser::ArrayPatternElementArrayListContext>)),
        std::make_pair(FormalParser::ContextIdObjectElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectElementContext> , &is<FormalParser::ObjectElementContext>)),
        std::make_pair(FormalParser::ContextIdObjectElementArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectElementArrayListContext> , &is<FormalParser::ObjectElementArrayListContext>)),
        std::make_pair(FormalParser::ContextIdPropertyName,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyNameContext> , &is<FormalParser::PropertyNameContext>)),
        std::make_pair(FormalParser::ContextIdFunctionReturnType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FunctionReturnTypeContext> , &is<FormalParser::FunctionReturnTypeContext>)),
        std::make_pair(FormalParser::ContextIdPropertyKey,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyKeyContext> , &is<FormalParser::PropertyKeyContext>)),
        std::make_pair(FormalParser::ContextIdComputedPropertyExpressionAssignment,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ComputedPropertyExpressionAssignmentContext> , &is<FormalParser::ComputedPropertyExpressionAssignmentContext>)),
        std::make_pair(FormalParser::ContextIdPropertySetter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertySetterContext> , &is<FormalParser::PropertySetterContext>)),
        std::make_pair(FormalParser::ContextIdPropertyShorthand,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PropertyShorthandContext> , &is<FormalParser::PropertyShorthandContext>)),
        std::make_pair(FormalParser::ContextIdShorthandAssignmentProperty,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ShorthandAssignmentPropertyContext> , &is<FormalParser::ShorthandAssignmentPropertyContext>)),
        std::make_pair(FormalParser::ContextIdAssignmentPatternInObject,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AssignmentPatternInObjectContext> , &is<FormalParser::AssignmentPatternInObjectContext>)),
        std::make_pair(FormalParser::ContextIdObjectPatternElement,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectPatternElementContext> , &is<FormalParser::ObjectPatternElementContext>)),
        std::make_pair(FormalParser::ContextIdGetAccessor,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GetAccessorContext> , &is<FormalParser::GetAccessorContext>)),
        std::make_pair(FormalParser::ContextIdBitShiftOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitShiftOperatorContext> , &is<FormalParser::BitShiftOperatorContext>)),
        std::make_pair(FormalParser::ContextIdSetAccessor,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SetAccessorContext> , &is<FormalParser::SetAccessorContext>)),
        std::make_pair(FormalParser::ContextIdArgumentArrayList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArgumentArrayListContext> , &is<FormalParser::ArgumentArrayListContext>)),
        std::make_pair(FormalParser::ContextIdArgument,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArgumentContext> , &is<FormalParser::ArgumentContext>)),
        std::make_pair(FormalParser::ContextIdRelationalExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::RelationalExpressionContext> , &is<FormalParser::RelationalExpressionContext>)),
        std::make_pair(FormalParser::ContextIdExpressionSequence,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExpressionSequenceContext> , &is<FormalParser::ExpressionSequenceContext>)),
        std::make_pair(FormalParser::ContextIdUpdateOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::UpdateOperatorContext> , &is<FormalParser::UpdateOperatorContext>)),
        std::make_pair(FormalParser::ContextIdUnaryOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::UnaryOperatorContext> , &is<FormalParser::UnaryOperatorContext>)),
        std::make_pair(FormalParser::ContextIdExponentiationOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExponentiationOperatorContext> , &is<FormalParser::ExponentiationOperatorContext>)),
        std::make_pair(FormalParser::ContextIdMultiplicativeOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MultiplicativeOperatorContext> , &is<FormalParser::MultiplicativeOperatorContext>)),
        std::make_pair(FormalParser::ContextIdRelationalOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::RelationalOperatorContext> , &is<FormalParser::RelationalOperatorContext>)),
        std::make_pair(FormalParser::ContextIdInstanceofOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InstanceofOperatorContext> , &is<FormalParser::InstanceofOperatorContext>)),
        std::make_pair(FormalParser::ContextIdInOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InOperatorContext> , &is<FormalParser::InOperatorContext>)),
        std::make_pair(FormalParser::ContextIdEqualityOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EqualityOperatorContext> , &is<FormalParser::EqualityOperatorContext>)),
        std::make_pair(FormalParser::ContextIdBitAndOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitAndOperatorContext> , &is<FormalParser::BitAndOperatorContext>)),
        std::make_pair(FormalParser::ContextIdBitOrOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitOrOperatorContext> , &is<FormalParser::BitOrOperatorContext>)),
        std::make_pair(FormalParser::ContextIdBitXorOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BitXorOperatorContext> , &is<FormalParser::BitXorOperatorContext>)),
        std::make_pair(FormalParser::ContextIdFunctionExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::FunctionExpressionContext> , &is<FormalParser::FunctionExpressionContext>)),
        std::make_pair(FormalParser::ContextIdObjectPropertyPair,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ObjectPropertyPairContext> , &is<FormalParser::ObjectPropertyPairContext>)),
        std::make_pair(FormalParser::ContextIdArrowFunctionExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrowFunctionExpressionContext> , &is<FormalParser::ArrowFunctionExpressionContext>)),
        std::make_pair(FormalParser::ContextIdMemberExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MemberExpressionContext> , &is<FormalParser::MemberExpressionContext>)),
        std::make_pair(FormalParser::ContextIdNewExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::NewExpressionContext> , &is<FormalParser::NewExpressionContext>)),
        std::make_pair(FormalParser::ContextIdCallExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::CallExpressionContext> , &is<FormalParser::CallExpressionContext>)),
        std::make_pair(FormalParser::ContextIdUnaryExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::UnaryExpressionContext> , &is<FormalParser::UnaryExpressionContext>)),
        std::make_pair(FormalParser::ContextIdExponentiationExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExponentiationExpressionContext> , &is<FormalParser::ExponentiationExpressionContext>)),
        std::make_pair(FormalParser::ContextIdMultiplicativeExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MultiplicativeExpressionContext> , &is<FormalParser::MultiplicativeExpressionContext>)),
        std::make_pair(FormalParser::ContextIdAdditiveExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AdditiveExpressionContext> , &is<FormalParser::AdditiveExpressionContext>)),
        std::make_pair(FormalParser::ContextIdInstanceofExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InstanceofExpressionContext> , &is<FormalParser::InstanceofExpressionContext>)),
        std::make_pair(FormalParser::ContextIdInExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InExpressionContext> , &is<FormalParser::InExpressionContext>)),
        std::make_pair(FormalParser::ContextIdEqualityExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EqualityExpressionContext> , &is<FormalParser::EqualityExpressionContext>)),
        std::make_pair(FormalParser::ContextIdConditionalExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ConditionalExpressionContext> , &is<FormalParser::ConditionalExpressionContext>)),
        std::make_pair(FormalParser::ContextIdQuestionMarkFollowedByDecimalDirectlyConditionExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::QuestionMarkFollowedByDecimalDirectlyConditionExpressionContext> , &is<FormalParser::QuestionMarkFollowedByDecimalDirectlyConditionExpressionContext>)),
        std::make_pair(FormalParser::ContextIdPatternInvolvedAssignmentExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PatternInvolvedAssignmentExpressionContext> , &is<FormalParser::PatternInvolvedAssignmentExpressionContext>)),
        std::make_pair(FormalParser::ContextIdAssignmentExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AssignmentExpressionContext> , &is<FormalParser::AssignmentExpressionContext>)),
        std::make_pair(FormalParser::ContextIdTemplateLiteralExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TemplateLiteralExpressionContext> , &is<FormalParser::TemplateLiteralExpressionContext>)),
        std::make_pair(FormalParser::ContextIdTaggedTemplateExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TaggedTemplateExpressionContext> , &is<FormalParser::TaggedTemplateExpressionContext>)),
        std::make_pair(FormalParser::ContextIdIteratorsExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IteratorsExpressionContext> , &is<FormalParser::IteratorsExpressionContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorsExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorsExpressionContext> , &is<FormalParser::GeneratorsExpressionContext>)),
        std::make_pair(FormalParser::ContextIdGeneratorsFunctionExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GeneratorsFunctionExpressionContext> , &is<FormalParser::GeneratorsFunctionExpressionContext>)),
        std::make_pair(FormalParser::ContextIdYieldExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::YieldExpressionContext> , &is<FormalParser::YieldExpressionContext>)),
        std::make_pair(FormalParser::ContextIdAwaitExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AwaitExpressionContext> , &is<FormalParser::AwaitExpressionContext>)),
        std::make_pair(FormalParser::ContextIdImportExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ImportExpressionContext> , &is<FormalParser::ImportExpressionContext>)),
        std::make_pair(FormalParser::ContextIdMetaProperty,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MetaPropertyContext> , &is<FormalParser::MetaPropertyContext>)),
        std::make_pair(FormalParser::ContextIdParenthesizedPrimType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ParenthesizedPrimTypeContext> , &is<FormalParser::ParenthesizedPrimTypeContext>)),
        std::make_pair(FormalParser::ContextIdThisExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ThisExpressionContext> , &is<FormalParser::ThisExpressionContext>)),
        std::make_pair(FormalParser::ContextIdIdentifierExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IdentifierExpressionContext> , &is<FormalParser::IdentifierExpressionContext>)),
        std::make_pair(FormalParser::ContextIdSuperExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SuperExpressionContext> , &is<FormalParser::SuperExpressionContext>)),
        std::make_pair(FormalParser::ContextIdLiteralExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::LiteralExpressionContext> , &is<FormalParser::LiteralExpressionContext>)),
        std::make_pair(FormalParser::ContextIdArrayExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrayExpressionContext> , &is<FormalParser::ArrayExpressionContext>)),
        std::make_pair(FormalParser::ContextIdOutput,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::OutputContext> , &is<FormalParser::OutputContext>)),
        std::make_pair(FormalParser::ContextIdTSAsExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TSAsExpressionContext> , &is<FormalParser::TSAsExpressionContext>)),
        std::make_pair(FormalParser::ContextIdIdentifier,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::IdentifierContext> , &is<FormalParser::IdentifierContext>)),
        std::make_pair(FormalParser::ContextIdMetaPropertyIdentifier,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::MetaPropertyIdentifierContext> , &is<FormalParser::MetaPropertyIdentifierContext>)),
        std::make_pair(FormalParser::ContextIdPrivateIdentifier,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PrivateIdentifierContext> , &is<FormalParser::PrivateIdentifierContext>)),
        std::make_pair(FormalParser::ContextIdBracketMemberExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BracketMemberExpressionContext> , &is<FormalParser::BracketMemberExpressionContext>)),
        std::make_pair(FormalParser::ContextIdDotMemberExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::DotMemberExpressionContext> , &is<FormalParser::DotMemberExpressionContext>)),
        std::make_pair(FormalParser::ContextIdPrivateMemberExpression,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PrivateMemberExpressionContext> , &is<FormalParser::PrivateMemberExpressionContext>)),
        std::make_pair(FormalParser::ContextIdGenericKind,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GenericKindContext> , &is<FormalParser::GenericKindContext>)),
        std::make_pair(FormalParser::ContextIdArrowFunctionParameters,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrowFunctionParametersContext> , &is<FormalParser::ArrowFunctionParametersContext>)),
        std::make_pair(FormalParser::ContextIdArrowFunctionBody,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ArrowFunctionBodyContext> , &is<FormalParser::ArrowFunctionBodyContext>)),
        std::make_pair(FormalParser::ContextIdAssignmentOperator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AssignmentOperatorContext> , &is<FormalParser::AssignmentOperatorContext>)),
        std::make_pair(FormalParser::ContextIdNumericLiteral,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::NumericLiteralContext> , &is<FormalParser::NumericLiteralContext>)),
        std::make_pair(FormalParser::ContextIdLiteral,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::LiteralContext> , &is<FormalParser::LiteralContext>)),
        std::make_pair(FormalParser::ContextIdTemplateLiteral,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TemplateLiteralContext> , &is<FormalParser::TemplateLiteralContext>)),
        std::make_pair(FormalParser::ContextIdAtomTemplateString,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AtomTemplateStringContext> , &is<FormalParser::AtomTemplateStringContext>)),
        std::make_pair(FormalParser::ContextIdBraceTemplateString,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::BraceTemplateStringContext> , &is<FormalParser::BraceTemplateStringContext>)),
        std::make_pair(FormalParser::ContextIdKeyword,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::KeywordContext> , &is<FormalParser::KeywordContext>)),
        std::make_pair(FormalParser::ContextIdSetter,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::SetterContext> , &is<FormalParser::SetterContext>)),
        std::make_pair(FormalParser::ContextIdEos,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::EosContext> , &is<FormalParser::EosContext>)),
        std::make_pair(FormalParser::ContextIdAssignable,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AssignableContext> , &is<FormalParser::AssignableContext>)),
        std::make_pair(FormalParser::ContextIdTypeAnnotation,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypeAnnotationContext> , &is<FormalParser::TypeAnnotationContext>)),
        std::make_pair(FormalParser::ContextIdQualifiedName,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::QualifiedNameContext> , &is<FormalParser::QualifiedNameContext>)),
        std::make_pair(FormalParser::ContextIdTypeName,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypeNameContext> , &is<FormalParser::TypeNameContext>)),
        std::make_pair(FormalParser::ContextIdJsPrimitiveType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::JsPrimitiveTypeContext> , &is<FormalParser::JsPrimitiveTypeContext>)),
        std::make_pair(FormalParser::ContextIdExtendedPrimitiveType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::ExtendedPrimitiveTypeContext> , &is<FormalParser::ExtendedPrimitiveTypeContext>)),
        std::make_pair(FormalParser::ContextIdTypeList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypeListContext> , &is<FormalParser::TypeListContext>)),
        std::make_pair(FormalParser::ContextIdAnonymousObjectPropertyListSeparator,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AnonymousObjectPropertyListSeparatorContext> , &is<FormalParser::AnonymousObjectPropertyListSeparatorContext>)),
        std::make_pair(FormalParser::ContextIdAnonymousObjectPropertyList,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AnonymousObjectPropertyListContext> , &is<FormalParser::AnonymousObjectPropertyListContext>)),
        std::make_pair(FormalParser::ContextIdCommaGeneric,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::CommaGenericContext> , &is<FormalParser::CommaGenericContext>)),
        std::make_pair(FormalParser::ContextIdAngleGeneric,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::AngleGenericContext> , &is<FormalParser::AngleGenericContext>)),
        std::make_pair(FormalParser::ContextIdPrimitiveType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::PrimitiveTypeContext> , &is<FormalParser::PrimitiveTypeContext>)),
        std::make_pair(FormalParser::ContextIdGenericType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::GenericTypeContext> , &is<FormalParser::GenericTypeContext>)),
        std::make_pair(FormalParser::ContextIdTupleType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TupleTypeContext> , &is<FormalParser::TupleTypeContext>)),
        std::make_pair(FormalParser::ContextIdUnionType,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::UnionTypeContext> , &is<FormalParser::UnionTypeContext>)),
        std::make_pair(FormalParser::ContextIdStruct,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::StructContext> , &is<FormalParser::StructContext>)),
        std::make_pair(FormalParser::ContextIdTypeReference,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypeReferenceContext> , &is<FormalParser::TypeReferenceContext>)),
        std::make_pair(FormalParser::ContextIdTypeAnnot,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypeAnnotContext> , &is<FormalParser::TypeAnnotContext>)),
        std::make_pair(FormalParser::ContextIdInput,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::InputContext> , &is<FormalParser::InputContext>)),
        std::make_pair(FormalParser::ContextIdTypePredicate,  std::make_pair(&AstVisitor<T>::template dispatchHelper<FormalParser::TypePredicateContext> , &is<FormalParser::TypePredicateContext>)),
};
} // namespace cyclone::parser
#endif
